1. Technical Field
This invention relates to the field of programming general purpose digital computers in a distributed software system. More particularly, this invention relates to document locking mechanisms in a collaborative structured authoring environment.
2. Background
The following definitions are useful in explaining the background of the invention and its detailed description. A xe2x80x9cdistributed systemxe2x80x9d is a software system in which multiple computers are connected together using some type of communication mechanism. Each of the computers in a distributed system is running one or more parts of the software system, requiring communication and coordination to accomplish a given function or task. A xe2x80x9ccollaborative systemxe2x80x9d is a software system that allows multiple users and/or processes to work in concert with each other on the same or closely related tasks. A distributed system is an essential enabler for a collaborative system since collaboration implies having multiple computers working at the same time. xe2x80x9cStructured authoringxe2x80x9d describes an approach to document authoring that is based on an underlying, predefined structure. Structured authoring implies a specific purpose document, or information type that is being created. In a structured authoring environment, types of information can be delineated and used, rules for enumeration and placement can be enforced, and guidance can be provided on missing information.
Structured authoring is particularly useful in developing complex documents that require input from many sources, for example, developing a request for proposal xe2x80x9cRFPxe2x80x9d in the government contracting context or developing a proposal in response to a RFP. Such complex documents may involve diverse expertise from engineering, accounting, marketing, legal, and management teams. Structured authoring may be applicable in any complex document management context.
Extensible Markup Language xe2x80x9cXMLxe2x80x9d provides a standard or data structure for structured authoring. XML is a subset of the Standardized General Markup Language xe2x80x9cSGMLxe2x80x9d tailored specifically for the Internet. Version 1.0 of the XML standard is available on the Internet at: http://www.w3.org./TR/REC-xml as of Jan. 4, 2000, the contents of which are herein incorporated by reference.
In distributed systems, as in structured authoring environments, there is frequently a need exists for multiple users (or clients) to share data or files. A xe2x80x9cuserxe2x80x9d may be a computer process or an actual person at a workstation. The terms xe2x80x9cuserxe2x80x9d and xe2x80x9cclientxe2x80x9d will be used synonymously herein. Also, the terms xe2x80x9cdataxe2x80x9d and xe2x80x9cfilexe2x80x9d are used synonymously herein. Many conventional database management systems have locking mechanisms to allow multiple users to concurrently share data and prevent two or more users from changing the same unit of data or file at the same time. To xe2x80x9clockxe2x80x9d data means to make a file, database record, or other data entity inaccessible. A locking scheme is a critical component of all multi-user software systems. When files are being shared, the operating system must ensure that two or more users do not attempt to modify the same file simultaneously. When database records are being shared, the database management system must ensure that two or more users do not attempt to modify the same data record (or set of data records) simultaneously. By locking a file, a user indicates the intention to modify the file. A well designed locking scheme is a trade off between ensuring the integrity of the data and minimizing the scope of the locking. This trade off occurs because locking data prevents others from performing certain functions. For example, the simplest approach to locking would be to lock all data as soon as one user wants to perform an operation. However, this effectively prevents everyone else from doing anything with the entire data set.
In practice, there are many different kinds of file locks. For example, locks for exclusive access, locks for shared access, locks on portions of a file and locks on the entire file. Conventionally, data structures describing the locks that have been placed on a file are kept on the same server (or computer system) as where the file is located. Users requesting a lock would then communicate with the file""s server. In the case where only a single user is using the file, the data structure for the locks may be kept at that user""s machine.
Conventional techniques for creating and locating data structures for locking mechanisms at the server or client machine are disclosed in U.S. Pat. Nos. 5,537,645 and 5,226,169. U.S. Pat. Nos. 4,399,504, 4,480,304 and 4,965,719 disclose locking methods for concurrently used resources in a multiprocessing, multiprogramming environment. U.S. Pat. No. 5,287,521 discloses a method and apparatus for releasing and obtaining shared and exclusive locks on data blocks in a multiprocessing, multiprogramming environment allowing serialization of access to the data blocks by multiple users. U.S. Pat. No. 5,913,227 discloses an agent-implemented locking mechanism for synchronizing access to a data object. U.S. Pat. No. 5,623,659 discloses a parent/child subset locking scheme for versioned objects. U.S. Pat. Nos. 5,890,153 and 5,319,780 disclose locking schemes for database management systems.
However, none of these patents appears to address accessing and locking all or portions of a hierarchical data structure, such as a hierarchically structured document. Furthermore, the conventional locking mechanisms disclosed do not appear to use or suggest a locking scheme or mechanism xe2x80x9ctunedxe2x80x9d to the software application rather than xe2x80x9ctunedxe2x80x9d to a database storage and management system. Thus, a need in the art exists for a method and system for locking hierarchically structured documents in a structured authoring environment. Furthermore, a need exists in the art for a locking scheme that ensures data integrity while, at the same time, minimizes the scope of the data locking to maximize the amount of the data structure available to other users.
A method for locking elements of a hierarchical data structure to allow multiple users at various distributed clients to simultaneously xe2x80x9ceditxe2x80x9d unlocked portions of the data structure, and systems for same are disclosed. The method of the invention includes checking for permission, setting and releasing various kind of locks. The structured authoring system of the invention may be distributed and collaborative. The process of checking for permission to set a lock is unique for each type of lock.
A method of xe2x80x9cedit lockingxe2x80x9d a target element includes requesting permission to edit lock a target element, checking for locks of any kind on the target element, checking for locks of any kind on the parent of the target element, checking for locks of any kind on a child of the target element and checking for delete locks along a branch from the target element to the root, inclusive. If any such locks are found, the permission to lock the target element is denied. Otherwise the permission is granted, the lock is set, and the client releases the lock when it is done editing.
A method of xe2x80x9ccreate lockingxe2x80x9d a target element includes requesting permission to create lock a target element, checking for locks of any kind on the target element and checking for delete locks along a branch from the target element to the root, inclusive. If any such locks are found, the permission to lock the target element is denied. Otherwise the permission is granted, the lock is set, and the client releases the lock when it is done creating. Note, that for a xe2x80x9ccreate lockxe2x80x9d, the target element is the parent node of the element to be created.
A method of xe2x80x9cdelete lockingxe2x80x9d a target element includes requesting permission to delete lock a target element, checking for locks of any kind on the target element, checking for locks of any kind on the parent of the target element, checking for edit locks or create locks on the subtree of the target element, checking for delete locks along a branch from the target element to the root, inclusive, and checking for create locks or edit locks on opposing cross-references in a subtree of the target element. If any such locks are found, the permission to lock the target element is denied. Otherwise the permission is granted, the lock is set, and the client releases the lock when the deletion is completed.
A system embodiment including data storage, information management in a middle tier and distributed clients are disclosed. The system embodiment includes the method of locking a hierarchical data structure as disclosed herein.